<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>adsl服务器状态</title>
<script src="/static/js/jquery-1.10.2.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="/static/css/reset.css" type="text/css" media="all" />

<style type="text/css">
.table_border td {border:1px solid #ccc; height:25px; line-height:25px; padding-left:10px;}
.search {padding: 10px;border: 1px dashed #ccc;margin-bottom: 5px;}

.pagination{ clear:both; margin:10px 0; }
.pagination em, .pagination a, .pagination strong{ text-decoration:none; margin-left:5px; padding:2px 5px; border:1px solid #E5E5E5; }
.pagination a:hover{ text-decoration:none; border:1px solid #09C; background:#09C; color:#FFF; }
.pagination strong{ border:none; font-weight:700; }

.main { width:1002px; min-height:500px;margin:30px auto 0;}
.word_list {width:100%; margin-top:30px;}
.option{cursor: pointer;}
</style>
</head>

<body>

<div class="main">
	<table class="table_border word_list">
		<tr>
			<td colspan="9" align="center">adsl服务器状态</td>
		</tr>    
		<tr>
			<td>ip:port</td>
			<td>source</td>
			<td>状态 1可用 0不可用</td>
			<td>新浪状态</td>
			<td>HTTP状态</td>
			
			<td>新浪平台使用次数</td>
			<td>入库时间</td>
			<td>新浪平台失效时间</td>
			<td>散列度</td>
		</tr>
		<?php 
		foreach($ip_list_status as $source) {  ?>
		<tr>
			<td><?=$source['ip'].':'.$source['port']?></td>
			<td><?=$source['source']?></td>
			<td><?=$source['status']?></td>
			<td><?=$source['sina_status']?></td>
			<td><?=$source['http_status']?></td>
			<td><?=$source['sina_use_count']?></td>
			<td><?=date('Y-m-d H:i:s',$source['ctime'])?></td>
			<td><? if($source['sina_lose_time']) echo date('Y-m-d H:i:s',$source['sina_lose_time']);?></td>
			<td><?=$source['cardinality']?></td>
		</tr>
		<?php }?>
	</table>

							
	<table class="table_border word_list">
		<tr>
			<td colspan="9" align="center">adsl失败情况报表</td>
		</tr>            
		<tr>
			<td>source</td>
			<td>use_sum</td>
			<td>error_sum</td>
			<td>timeout</td>
			<td>socks5_request_ack</td>
			<td>socks5_response</td>
			<td>connect_host_error</td>
			<td>verified_code</td>
			<td>others</td>
		</tr>
		<?php 
		foreach($error_list as $info) {  ?>
		<tr>
			<td><?=$info['source']?></td>
			<td><?=$info['use_sum']?></td>
			<td><?=$info['error_sum']?></td>
			<td><?=$info['timeout']?></td>
			<td><?=$info['socks5_request_ack']?></td>
			<td><?=$info['socks5_response']?></td>
			<td><?=$info['connect_host_error']?></td>
			<td><?=$info['verified_code']?></td>
			<td><?=$info['others']?></td>
		</tr>
		<?php }?>
  </table>

							
	<table class="table_border word_list">
		<tr>
			<td colspan="2" align="center">adsl更新延时情况报表</td>
		</tr>            
		<tr>
			<td>source</td>
			<td>总数</td>
		</tr>
		<?php 
		foreach($delayed_list as $info) {  ?>
		<tr>
			<td><?=$info['source']?></td>
			<td><?=$info['c']?></td>
		</tr>
		<?php }?>
	</table>
</div>
</body>
</html>
